package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class RoleSpecification {

    private int beginIndex;
    private int endIndex;
    private ValueSpecification valueSpecification;

    public RoleSpecification(ValueSpecification valueSpecification) {
        this.beginIndex = valueSpecification.getBeginIndex();
        this.endIndex = valueSpecification.getEndIndex();
        this.valueSpecification = valueSpecification;
    }

    public RoleSpecification(int beginIndex, int endIndex) {
        this.beginIndex = beginIndex;
        this.endIndex = endIndex;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public ValueSpecification getValueSpecification() {
        return valueSpecification;
    }

    public boolean isNone() {
        return valueSpecification == null;
    }

}
